package day05;
import java.util.Scanner;
import java.util.Arrays;
public class Practise {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int a[]=new int[10];//i是定义的下标
        /* 遍历数组 */
       for(int i=0;i<a.length;i++){
           a[i]=(int) (Math.random()*100);
           System.out.println(a[i]);
       }


        //九九乘法表
       /* for (int a=1;a<=9;a++){//换行
            for (int i=1;i<=a;i++){//列
                System.out.print(i+"*"+a+"="+a*i+"\t");
            }
            System.out.println();
        }*/
       /*
       a=1  i=1   1*1=1
       a=2  i=2   2*2=4

        */



        /*
        随机加法运算器
        int score =0;
        for (int i=1;i<=10;i++){
            int a=(int)(Math.random()*100+1);
            int b=(int)(Math.random()*100+1);
            int result =a+b;
            System.out.println(a+"+"+b+"=?");
            System.out.println("猜吧");
            int answer =scan.nextInt();
            if (answer==result){
                System.out.println("答对了");
                score+=10;
            }else {
                System.out.println("答错了");
            }
        }
        System.out.println("总分为"+score);
         */





    }
}
